home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / Testing & Debugging / Fill Memory / Read Me - Fill Memory.doc next >
Encoding:
Text File  |  1996-03-15  |  1.0 KB  |  26 lines  |  [TEXT/CWIE]

  1. /*                                        Fill Memory
  2.  
  3.     This is a simple debugging aid.
  4.     
  5.     It is a little app that I wrote to convince myself that my app wasn't causing
  6.     other applications to crash.
  7.     
  8.     All this application does is fill its memory with a simple pattern and then checks
  9.     over and over to make sure that the pattern hasn't changed.
  10.     
  11.     If you set this app's memory partition high enough it will take over almost all available
  12.     RAM, allowing you to test your application in both low system memory envinronments and
  13.     to see if your application accidently writes to memory that is not its.  Since this app
  14.     doesn't do any tricky checking it is hardly fool-proof, but it convinced me that the
  15.     string of crashes in other applications I was seeing when app was running was mearly a
  16.     fluke.
  17.     
  18.     It was right, after a reboot and no code changes to my app the crashing stopped.  This
  19.     saved me countless hours from trying to track down a bug that was not in my code.  Maybe
  20.     it can do the same for you.
  21.     
  22.     Enjoy,
  23.     Mark Cookson (mcookson@apple.com)
  24.     Developer Technical Support
  25.     Apple Computer, Inc.
  26. */